home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / CIncludes / NetSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  15.6 KB  |  565 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.0.2
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1996-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __NETSPROCKET__
  19. #define __NETSPROCKET__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __EVENTS__
  25. #include <Events.h>
  26. #endif
  27.  
  28. #if TARGET_OS_MAC
  29.  
  30. #include <OpenTransport.h>
  31. #include <OpenTptInternet.h>
  32.  
  33. #endif  /* TARGET_OS_MAC */
  34.  
  35.  
  36.  
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if PRAGMA_IMPORT
  46. #pragma import on
  47. #endif
  48.  
  49. #if PRAGMA_STRUCT_ALIGN
  50.     #pragma options align=power
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52.     #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54.     #pragma pack(2)
  55. #endif
  56.  
  57. #if TARGET_OS_MAC
  58.  
  59. enum {
  60.     kNSpMaxPlayerNameLen        = 31,
  61.     kNSpMaxGroupNameLen            = 31,
  62.     kNSpMaxPasswordLen            = 31,
  63.     kNSpMaxGameNameLen            = 31,
  64.     kNSpMaxDefinitionStringLen    = 255
  65. };
  66.  
  67.  
  68. /* NetSprocket basic types */
  69. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  70. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  71. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  72. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  73. typedef SInt32                             NSpEventCode;
  74. typedef SInt32                             NSpGameID;
  75. typedef SInt32                             NSpPlayerID;
  76. typedef NSpPlayerID                     NSpGroupID;
  77. typedef UInt32                             NSpPlayerType;
  78. typedef SInt32                             NSpFlags;
  79. /* Individual player info */
  80.  
  81. struct NSpPlayerInfo {
  82.     NSpPlayerID                     id;
  83.     NSpPlayerType                     type;
  84.     Str31                             name;
  85.     UInt32                             groupCount;
  86.     NSpGroupID                         groups[1];
  87. };
  88. typedef struct NSpPlayerInfo NSpPlayerInfo;
  89.  
  90. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  91. /* list of all players */
  92.  
  93. struct NSpPlayerEnumeration {
  94.     UInt32                             count;
  95.     NSpPlayerInfoPtr                 playerInfo[1];
  96. };
  97. typedef struct NSpPlayerEnumeration        NSpPlayerEnumeration;
  98. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  99. /* Individual group info */
  100.  
  101. struct NSpGroupInfo {
  102.     NSpGroupID                         id;
  103.     UInt32                             playerCount;
  104.     NSpPlayerID                     players[1];
  105. };
  106. typedef struct NSpGroupInfo                NSpGroupInfo;
  107. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  108. /* List of all groups */
  109.  
  110. struct NSpGroupEnumeration {
  111.     UInt32                             count;
  112.     NSpGroupInfoPtr                 groups[1];
  113. };
  114. typedef struct NSpGroupEnumeration        NSpGroupEnumeration;
  115. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  116. /* Topology types */
  117.  
  118. typedef UInt32                             NSpTopology;
  119.  
  120. enum {
  121.     kNSpClientServer            = 0x00000001
  122. };
  123.  
  124. /* Game information */
  125.  
  126. struct NSpGameInfo {
  127.     UInt32                             maxPlayers;
  128.     UInt32                             currentPlayers;
  129.     UInt32                             currentGroups;
  130.     NSpTopology                     topology;
  131.     UInt32                             reserved;
  132.     Str31                             name;
  133.     Str31                             password;
  134. };
  135. typedef struct NSpGameInfo                NSpGameInfo;
  136. /* Structure used for sending and receiving network messages */
  137.  
  138. struct NSpMessageHeader {
  139.     UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  140.     SInt32                             what;                        /* The kind of message (e.g. player joined) */
  141.     NSpPlayerID                     from;                        /* ID of the sender */
  142.     NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  143.     UInt32                             id;                            /* Unique ID for this message & (from) player */
  144.     UInt32                             when;                        /* Timestamp for the message */
  145.     UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  146. };
  147. typedef struct NSpMessageHeader NSpMessageHeader;
  148.  
  149. /* NetSprocket-defined message structures */
  150.  
  151. struct NSpErrorMessage {
  152.     NSpMessageHeader                 header;
  153.     OSStatus                         error;
  154. };
  155. typedef struct NSpErrorMessage            NSpErrorMessage;
  156.  
  157. struct NSpJoinRequestMessage {
  158.     NSpMessageHeader                 header;
  159.     Str31                             name;
  160.     Str31                             password;
  161.     UInt32                             theType;
  162.     UInt32                             customDataLen;
  163.     UInt8                             customData[1];
  164. };
  165. typedef struct NSpJoinRequestMessage    NSpJoinRequestMessage;
  166.  
  167. struct NSpJoinApprovedMessage {
  168.     NSpMessageHeader                 header;
  169. };
  170. typedef struct NSpJoinApprovedMessage    NSpJoinApprovedMessage;
  171.  
  172. struct NSpJoinDeniedMessage {
  173.     NSpMessageHeader                 header;
  174.     Str255                             reason;
  175. };
  176. typedef struct NSpJoinDeniedMessage        NSpJoinDeniedMessage;
  177.  
  178. struct NSpPlayerJoinedMessage {
  179.     NSpMessageHeader                 header;
  180.     UInt32                             playerCount;
  181.     NSpPlayerInfo                     playerInfo;
  182. };
  183. typedef struct NSpPlayerJoinedMessage    NSpPlayerJoinedMessage;
  184.  
  185. struct NSpPlayerLeftMessage {
  186.     NSpMessageHeader                 header;
  187.     UInt32                             playerCount;
  188.     NSpPlayerID                     playerID;
  189. };
  190. typedef struct NSpPlayerLeftMessage        NSpPlayerLeftMessage;
  191.  
  192. struct NSpHostChangedMessage {
  193.     NSpMessageHeader                 header;
  194.     NSpPlayerID                     newHost;
  195. };
  196. typedef struct NSpHostChangedMessage    NSpHostChangedMessage;
  197.  
  198. struct NSpGameTerminatedMessage {
  199.     NSpMessageHeader                 header;
  200. };
  201. typedef struct NSpGameTerminatedMessage    NSpGameTerminatedMessage;
  202. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  203.  
  204. enum {
  205.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  206.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  207.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  208. };
  209.  
  210.  
  211. /* Options for message delivery.  These can be bitwise ORed together with each other,
  212.         as well as with ONE of the above */
  213.  
  214. enum {
  215.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  216.     kNSpSendFlag_SelfSend        = 0x00000002,
  217.     kNSpSendFlag_Blocking        = 0x00000004
  218. };
  219.  
  220.  
  221. /* Options for Hosting Joining, and Deleting games */
  222.  
  223. enum {
  224.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  225.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  226. };
  227.  
  228. /* Message "what" types */
  229. /* Apple reserves all negative "what" values (anything with bit 32 set) */
  230.  
  231. enum {
  232.     kNSpSystemMessagePrefix        = (long)0x80000000,
  233.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  234.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  235.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  236.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  237.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  238.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  239.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  240.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007
  241. };
  242.  
  243.  
  244. /* Special TPlayerIDs  for sending messages */
  245.  
  246. enum {
  247.     kNSpAllPlayers                = 0x00000000,
  248.     kNSpHostOnly                = (long)0xFFFFFFFF
  249. };
  250.  
  251.  
  252. /* NetSprocket Error Codes */
  253.  
  254. enum {
  255.     kNSpInitializationFailedErr    = -30360,
  256.     kNSpAlreadyInitializedErr    = -30361,
  257.     kNSpTopologyNotSupportedErr    = -30362,
  258.     kNSpPipeFullErr                = -30364,
  259.     kNSpHostFailedErr            = -30365,
  260.     kNSpProtocolNotAvailableErr    = -30366,
  261.     kNSpInvalidGameRefErr        = -30367,
  262.     kNSpInvalidParameterErr        = -30369,
  263.     kNSpOTNotPresentErr            = -30370,
  264.     kNSpOTVersionTooOldErr        = -30371,
  265.     kNSpMemAllocationErr        = -30373,
  266.     kNSpAlreadyAdvertisingErr    = -30374,
  267.     kNSpNotAdvertisingErr        = -30376,
  268.     kNSpInvalidAddressErr        = -30377,
  269.     kNSpFreeQExhaustedErr        = -30378,
  270.     kNSpRemovePlayerFailedErr    = -30379,
  271.     kNSpAddressInUseErr            = -30380,
  272.     kNSpFeatureNotImplementedErr = -30381,
  273.     kNSpNameRequiredErr            = -30382,
  274.     kNSpInvalidPlayerIDErr        = -30383,
  275.     kNSpInvalidGroupIDErr        = -30384,
  276.     kNSpNoPlayersErr            = -30385,
  277.     kNSpNoGroupsErr                = -30386,
  278.     kNSpNoHostVolunteersErr        = -30387,
  279.     kNSpCreateGroupFailedErr    = -30388,
  280.     kNSpAddPlayerFailedErr        = -30389,
  281.     kNSpInvalidDefinitionErr    = -30390,
  282.     kNSpInvalidProtocolRefErr    = -30391,
  283.     kNSpInvalidProtocolListErr    = -30392,
  284.     kNSpTimeoutErr                = -30393,
  285.     kNSpGameTerminatedErr        = -30394,
  286.     kNSpConnectFailedErr        = -30395,
  287.     kNSpSendFailedErr            = -30396,
  288.     kNSpJoinFailedErr            = -30399
  289. };
  290.  
  291.  
  292.  
  293.  
  294. /************************  Initialization  ************************/
  295. EXTERN_API_C( OSStatus )
  296. NSpInitialize                    (UInt32                 inStandardMessageSize,
  297.                                  UInt32                 inBufferSize,
  298.                                  UInt32                 inQElements,
  299.                                  NSpGameID                 inGameID,
  300.                                  UInt32                 inTimeout);
  301.  
  302.  
  303.  
  304.  
  305. /**************************  Protocols  **************************/
  306. /* Programmatic protocol routines */
  307. EXTERN_API_C( OSStatus )
  308. NSpProtocol_New                    (const char *            inDefinitionString,
  309.                                  NSpProtocolReference *    outReference);
  310.  
  311. EXTERN_API_C( void )
  312. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  313.  
  314. EXTERN_API_C( OSStatus )
  315. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  316.                                  char *                    outDefinitionString);
  317.  
  318.  
  319. /* Protocol list routines */
  320. EXTERN_API_C( OSStatus )
  321. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  322.                                  NSpProtocolListReference * outList);
  323.  
  324. EXTERN_API_C( void )
  325. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  326.  
  327. EXTERN_API_C( OSStatus )
  328. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  329.                                  NSpProtocolReference     inProtocolRef);
  330.  
  331. EXTERN_API_C( OSStatus )
  332. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  333.                                  NSpProtocolReference     inProtocolRef);
  334.  
  335. EXTERN_API_C( OSStatus )
  336. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  337.                                  UInt32                 inIndex);
  338.  
  339. EXTERN_API_C( UInt32 )
  340. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  341.  
  342. EXTERN_API_C( NSpProtocolReference )
  343. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  344.                                  UInt32                 inIndex);
  345.  
  346.  
  347. /* Helpers */
  348. EXTERN_API_C( NSpProtocolReference )
  349. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  350.                                  ConstStr31Param         inNBPType,
  351.                                  UInt32                 inMaxRTT,
  352.                                  UInt32                 inMinThruput);
  353.  
  354. EXTERN_API_C( NSpProtocolReference )
  355. NSpProtocol_CreateIP            (InetPort                 inPort,
  356.                                  UInt32                 inMaxRTT,
  357.                                  UInt32                 inMinThruput);
  358.  
  359.  
  360. /***********************  Human Interface  ************************/
  361. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  362. EXTERN_API_C( NSpAddressReference )
  363. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  364.                                  ConstStr255Param         inEntityListLabel,
  365.                                  Str31                     ioName,
  366.                                  Str31                     ioPassword,
  367.                                  NSpEventProcPtr         inEventProcPtr);
  368.  
  369. EXTERN_API_C( Boolean )
  370. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  371.                                  Str31                     ioGameName,
  372.                                  Str31                     ioPlayerName,
  373.                                  Str31                     ioPassword,
  374.                                  NSpEventProcPtr         inEventProcPtr);
  375.  
  376.  
  377. /*********************  Hosting and Joining  **********************/
  378. EXTERN_API_C( OSStatus )
  379. NSpGame_Host                    (NSpGameReference *        outGame,
  380.                                  NSpProtocolListReference  inProtocolList,
  381.                                  UInt32                 inMaxPlayers,
  382.                                  ConstStr31Param         inGameName,
  383.                                  ConstStr31Param         inPassword,
  384.                                  ConstStr31Param         inPlayerName,
  385.                                  NSpPlayerType             inPlayerType,
  386.                                  NSpTopology             inTopology,
  387.                                  NSpFlags                 inFlags);
  388.  
  389. EXTERN_API_C( OSStatus )
  390. NSpGame_Join                    (NSpGameReference *        outGame,
  391.                                  NSpAddressReference     inAddress,
  392.                                  ConstStr31Param         inName,
  393.                                  ConstStr31Param         inPassword,
  394.                                  NSpPlayerType             inType,
  395.                                  void *                    inCustomData,
  396.                                  UInt32                 inCustomDataLen,
  397.                                  NSpFlags                 inFlags);
  398.  
  399. EXTERN_API_C( OSStatus )
  400. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  401.                                  NSpProtocolReference     inProtocol,
  402.                                  Boolean                 inEnable);
  403.  
  404. EXTERN_API_C( OSStatus )
  405. NSpGame_Dispose                    (NSpGameReference         inGame,
  406.                                  NSpFlags                 inFlags);
  407.  
  408. EXTERN_API_C( OSStatus )
  409. NSpGame_GetInfo                    (NSpGameReference         inGame,
  410.                                  NSpGameInfo *            ioInfo);
  411.  
  412. /**************************  Messaging  **************************/
  413. EXTERN_API_C( OSStatus )
  414. NSpMessage_Send                    (NSpGameReference         inGame,
  415.                                  NSpMessageHeader *        inMessage,
  416.                                  NSpFlags                 inFlags);
  417.  
  418. EXTERN_API_C( NSpMessageHeader *)
  419. NSpMessage_Get                    (NSpGameReference         inGame);
  420.  
  421. EXTERN_API_C( void )
  422. NSpMessage_Release                (NSpGameReference         inGame,
  423.                                  NSpMessageHeader *        inMessage);
  424.  
  425. /* Helpers */
  426. EXTERN_API_C( OSStatus )
  427. NSpMessage_SendTo                (NSpGameReference         inGame,
  428.                                  NSpPlayerID             inTo,
  429.                                  SInt32                 inWhat,
  430.                                  void *                    inData,
  431.                                  UInt32                 inDataLen,
  432.                                  NSpFlags                 inFlags);
  433.  
  434.  
  435. /*********************  Player Information  **********************/
  436. EXTERN_API_C( NSpPlayerID )
  437. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  438.  
  439. EXTERN_API_C( OSStatus )
  440. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  441.                                  NSpPlayerID             inPlayerID,
  442.                                  NSpPlayerInfoPtr *        outInfo);
  443.  
  444. EXTERN_API_C( void )
  445. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  446.                                  NSpPlayerInfoPtr         inInfo);
  447.  
  448. EXTERN_API_C( OSStatus )
  449. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  450.                                  NSpPlayerEnumerationPtr * outPlayers);
  451.  
  452. EXTERN_API_C( void )
  453. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  454.                                  NSpPlayerEnumerationPtr  inPlayers);
  455.  
  456. EXTERN_API_C( UInt32 )
  457. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  458.                                  NSpPlayerID             inPlayer);
  459.  
  460. EXTERN_API_C( UInt32 )
  461. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  462.                                  NSpPlayerID             inPlayer);
  463.  
  464.  
  465. /*********************  Group Management  **********************/
  466. EXTERN_API_C( OSStatus )
  467. NSpGroup_New                    (NSpGameReference         inGame,
  468.                                  NSpGroupID *            outGroupID);
  469.  
  470. EXTERN_API_C( OSStatus )
  471. NSpGroup_Dispose                (NSpGameReference         inGame,
  472.                                  NSpGroupID             inGroupID);
  473.  
  474. EXTERN_API_C( OSStatus )
  475. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  476.                                  NSpGroupID             inGroupID,
  477.                                  NSpPlayerID             inPlayerID);
  478.  
  479. EXTERN_API_C( OSStatus )
  480. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  481.                                  NSpGroupID             inGroupID,
  482.                                  NSpPlayerID             inPlayerID);
  483.  
  484. EXTERN_API_C( OSStatus )
  485. NSpGroup_GetInfo                (NSpGameReference         inGame,
  486.                                  NSpGroupID             inGroupID,
  487.                                  NSpGroupInfoPtr *        outInfo);
  488.  
  489. EXTERN_API_C( void )
  490. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  491.                                  NSpGroupInfoPtr         inInfo);
  492.  
  493. EXTERN_API_C( OSStatus )
  494. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  495.                                  NSpGroupEnumerationPtr * outGroups);
  496.  
  497. EXTERN_API_C( void )
  498. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  499.                                  NSpGroupEnumerationPtr  inGroups);
  500.  
  501.  
  502. /**************************  Utilities  ***************************/
  503. EXTERN_API_C( NumVersion )
  504. NSpGetVersion                    (void);
  505.  
  506. EXTERN_API_C( void )
  507. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  508.  
  509. EXTERN_API_C( UInt32 )
  510. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  511.  
  512. EXTERN_API_C( NSpAddressReference )
  513. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  514.  
  515. EXTERN_API_C( OTAddress *)
  516. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  517.  
  518. EXTERN_API_C( void )
  519. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  520.  
  521.  
  522. /************************ Advanced/Async routines ****************/
  523. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  524. EXTERN_API_C( OSStatus )
  525. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  526.                                  void *                    inContext);
  527.  
  528.  
  529. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  530. EXTERN_API_C( OSStatus )
  531. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  532.                                  void *                    inContext);
  533.  
  534.  
  535. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  536. EXTERN_API_C( OSStatus )
  537. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  538.                                  void *                    inContext);
  539.  
  540.  
  541.  
  542. #endif  /* TARGET_OS_MAC */
  543.  
  544.  
  545. #if PRAGMA_STRUCT_ALIGN
  546.     #pragma options align=reset
  547. #elif PRAGMA_STRUCT_PACKPUSH
  548.     #pragma pack(pop)
  549. #elif PRAGMA_STRUCT_PACK
  550.     #pragma pack()
  551. #endif
  552.  
  553. #ifdef PRAGMA_IMPORT_OFF
  554. #pragma import off
  555. #elif PRAGMA_IMPORT
  556. #pragma import reset
  557. #endif
  558.  
  559. #ifdef __cplusplus
  560. }
  561. #endif
  562.  
  563. #endif /* __NETSPROCKET__ */
  564.  
  565.